#include <iostream>
using namespace std;
int map[1005][1005] = {0};
    int sumx[1005] = {0};
    int sumy[1005] = {0};
int main()
{
    int temp=0, ans = 0, num = 0;
    int n;
    cin >> n;
    
    // 输入 & 检验是否有落脚点
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            scanf("%d", &map[i][j]);
            if (map[i][j] == 0)
                ans = 1;
        }
    }
    if (ans == 0)
    {
        printf("Bad Game!");
        return 0;
    }
    // 有落脚点
    // 计算 每行的和 & 每列的和
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            sumx[i] += map[i][j];
        }
    }
    for (int j = 0; j < n; j++)
    {
        for (int i = 0; i < n; i++)
        {
            sumy[j] += map[i][j];
        }
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            if (map[i][j] == 0)
            {
                temp = sumx[i] + sumy[j];

            }
            if (temp > num)
            {
                num = temp;
            }
        }
    }

    cout << num;
    return 0;
}
/*

// 行+列,找最大
    temp = sumx[0] + sumy[0];
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            bool a = false;
            // 确保该横行有空位(0),再确保该列有空位(0)
            if (sumx[i] >= n)
            {
                break;
            }
            if (sumy[j] >= n)
            {
                continue;
            }
            else
            {
                if (temp == n + n || (sumx[0] >= n && sumy[0] >= n))
                {
                    if (a == false)
                    {
                        temp = sumx[i] + sumy[j];
                        a = true;
                    }
                }
                if (temp < sumx[i] + sumy[j + i] && sumy[j + 1] < n)
                {
                    temp = sumx[i] + sumy[j + i];
                }
            }
        }
    }


*/